/**   
* @Title: CodeServiceImpl.java
* @Package org.jbeer.sample.bean.service
* @author Bieber
* @date 2014-5-17 下午10:32:01
* @version V1.0   
*/

package org.jbeer.sample.bean.service;

import com.jbeer.framework.annotation.Bean;
import com.jbeer.framework.enumeration.BeanScope;
import com.jbeer.framework.ioc.BeanFactory;
import com.jbeer.framework.support.BeanFactoryAware;
import com.jbeer.framework.support.BeanNameAware;
import com.jbeer.framework.support.InitializingBean;

/**
 * <p>类功能说明:TODO</p>
 * <p>类修改者	    修改日期</p>
 * <p>修改说明</p>
 * <p>Title: CodeServiceImpl.java</p>
 * @author Bieber <a mailto="bieber.jbeer@hotmail.com">bieber.jbeer@hotmail.com</a>
 * @date 2014-5-17 下午10:32:01
 * @version V1.0
 */
@Bean(scope=BeanScope.SESSION,factoryMethodName="ini")
public class CodeServiceImpl implements CodeService,BeanNameAware,InitializingBean,BeanFactoryAware{

	
	public static CodeService ini(){
		return new CodeServiceImpl();
	}
	/* (non-Javadoc)
	 * @see org.jbeer.sample.bean.service.CodeService#hello()
	 */
	@Override
	public String hello() {
		return "interface hello";
	}
	/* (non-Javadoc)
	 * @see com.jbeer.framework.support.BeanFactoryAware#setBeanFactory(com.jbeer.framework.ioc.BeanFactory)
	 */
	@Override
	public void setBeanFactory(BeanFactory beanFactory) {
		System.out.println(this.getClass().getName()+"->"+beanFactory);
	}
	/* (non-Javadoc)
	 * @see com.jbeer.framework.support.InitializingBean#afterPropertiesSet(java.lang.String, java.lang.Object)
	 */
	@Override
	public void afterPropertiesSet(String beanName, Object bean)
			throws Exception {
		System.out.println(this.getClass().getName()+"->"+beanName);
		
	}
	/* (non-Javadoc)
	 * @see com.jbeer.framework.support.BeanNameAware#setBeanName(java.lang.String)
	 */
	@Override
	public void setBeanName(String beanName) {
		System.out.println(this.getClass().getName()+"->setBeanName "+beanName);
	}

}
